package models;

import java.util.Date;

import javax.jdo.annotations.Index;
import javax.persistence.Id;

import com.googlecode.objectify.annotation.Cached;
import com.googlecode.objectify.annotation.Unindexed;

@Cached
public class User {
	@Id private String gmail = "";
	
	@Unindexed private String name = "";

	@Index private int status = 0; //0=inactive, 1=pending, 2=active
	
	@Unindexed private Date created = new Date();
	
	@Unindexed private Date expired = new Date();
	
	@Unindexed private Date lastPayment = new Date();
	
	@Unindexed private int role = 0; //0-user, 1-admin
	
	@Unindexed private int limitBlog = 5;
	
	public String getGmail() {
		return gmail;
	}

	public void setGmail(String gmail) {
		this.gmail = gmail;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getExpired() {
		return expired;
	}

	public void setExpired(Date expired) {
		this.expired = expired;
	}

	public Date getLastPayment() {
		return lastPayment;
	}

	public void setLastPayment(Date lastPayment) {
		this.lastPayment = lastPayment;
	}

	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}

	public int getLimitBlog() {
		return limitBlog;
	}

	public void setLimitBlog(int limitBlog) {
		this.limitBlog = limitBlog;
	}
	
}
